home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 65 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.6 KB

  1. Path: sdrc.com!thor!scjones
  2. From: larry.jones@sdrc.com (Larry Jones)
  3. Newsgroups: comp.std.c
  4. Subject: Re: Undefined result vs. int's holding undefined values.
  5. Date: 9 Jan 1996 19:58:54 GMT
  6. Organization: SDRC Engineering Services
  7. Distribution: world
  8. Message-ID: <4cuhdu$ff2@info1.sdrc.com>
  9. References: <4ck70b$rd7@news.informix.com> <4ckms5$rd7@news.informix.com>  <4cpv1n$apm@der.twinsun.com>
  10. NNTP-Posting-Host: thor.sdrc.com
  11. Originator: scjones@thor
  12.  
  13. In article <4cpv1n$apm@der.twinsun.com>, eggert@twinsun.com (Paul Eggert) writes:
  14. > Since this is comp.std.c, I'll mention that the (x + y < x) != (y < 0) method
  15. > and Daniel Wood's example both port to any C implementation
  16. > claiming conformance to LIA-1 (ISO/IEC 10967-1:1994(E),
  17. > `Information technology -- Language independent arithmetic -- Part 1:
  18. > Integer floating point arithmetic' <ftp://crl.dec.com/pub/misc/lia-1-dis.ps.Z>)
  19. > if INT_MODULO is true (which is the only plausible value for INT_MODULO
  20. > for real-world C compilers).
  21.  
  22. The current thinking about binding LIA-1 to C allows signed and unsiged
  23. integers to have different behavior.  Whilst unsigned integers *have*
  24. to be MODULO for standard conformance, there is no good reason for
  25. signed integers to be the same (other than that many existing machine
  26. architectures make it very inconvenient to have them be different). 
  27. Some (many?) people think that raising an exception of some kind for
  28. signed integer overflow is very desirable, rather than allowing the
  29. answer to quietly wrap around.
  30. ----
  31. Larry Jones, SDRC, 2000 Eastman Dr., Milford, OH  45150-2789  513-576-2070
  32. larry.jones@sdrc.com
  33. Some people just don't have inquisitive minds. -- Calvin
  34.